from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

import sys

sys.path.append(r'..')
from web_base.base_page import BasePage
from page_object.login_page import LoginPage
from test_case.options import options


class Location(BasePage):
    url = r'/bsams/front/asset_storage/asset_storage_list.do'
    # 查询
    sel_status_loc = (By.ID, 'status')
    sel_title_loc = (By.ID, 'title')
    sel_ok_loc = (By.CLASS_NAME, 'search_button')

    def location_select(self, status, title):
        self.open()
        self.ele_select(self.sel_status_loc, status)
        self.ele_clear(self.sel_title_loc)
        self.inpit_ele(self.sel_title_loc, title)
        self.ele_click(self.sel_ok_loc)
        sleep(3)
